<div class="text-center">
	<h1 translate="ADMIN.LOGIN_ATTEMPTS"></h1>

	<loading-indicator hide="vm.loginAttempts"></loading-indicator>

	<uib-pagination max-size="10" items-per-page="vm.itemsPerPage" total-items="vm.totalItems" ng-model="vm.currentPage" ng-click="vm.getLoginAttempts()" previous-text="{{ 'PAGER.PREVIOUS' | translate }}" next-text="{{ 'PAGER.NEXT' | translate }}" boundary-links="true" first-text="{{ 'PAGER.FIRST' | translate }}" last-text="{{ 'PAGER.LAST' | translate }}"></uib-pagination>

	<div class="col-lg-10 col-lg-push-1">
		<table class="table text-left" ng-show="vm.loginAttempts">
			<tr>
				<th class="text-left" translate="TORRENTS.DATE"></th>
				<th class="text-left" translate="ADMIN.IP"></th>
				<th class="text-left" translate="TORRENTS.USERNAME"></th>
				<th class="text-left" translate="SIGNUP.PASSWORD"></th>
				<th translate="BUTTONS.DELETE"></th>
			</tr>
			<tr ng-repeat="login in vm.loginAttempts track by login.id">
				<td>{{ ::login.added }}</td>
				<td><a href="" ui-sref="admin-search({ip: login.ip})">{{ ::login.ip }}</a></td>
				<td>
					<user ng-if="::login.user.id" user="::login.user"></user>
					<span ng-if="::!login.user.id">{{ ::login.name }} ?</span>
				</td>
				<td>{{ ::login.password }}</td>
				<td class="text-center">
					<button ng-click="vm.delete(login)" class="btn btn-xs btn-default"><i class="fa fa-trash-o"></i></button>
				</td>
			</tr>
		</table>
	</div>

	<div class="clearfix"></div>

	<uib-pagination max-size="10" items-per-page="vm.itemsPerPage" total-items="vm.totalItems" ng-model="vm.currentPage" ng-click="vm.getLoginAttempts()" previous-text="{{ 'PAGER.PREVIOUS' | translate }}" next-text="{{ 'PAGER.NEXT' | translate }}" boundary-links="true" first-text="{{ 'PAGER.FIRST' | translate }}" last-text="{{ 'PAGER.LAST' | translate }}"></uib-pagination>
</div>
